package concurrensy;

import java.util.ArrayList;
import java.util.List;

import concurrensy.sin_array_sumator.BadConcurrentSinArraySumator;
import concurrensy.sin_array_sumator.ConcurrentSinArraySumator;
import concurrensy.sin_array_sumator.OneThreadSinArraySumator;
import concurrensy.sin_array_sumator.SinArraySumator;
import concurrensy.sorter.ConcurrentMergeSorter;
import concurrensy.sorter.MergeSorter;
import concurrensy.sorter.OneThreadMergeSorter;

public class Main {

	public static void main(String[] args) {		
//		SinArraySumator sum = new ConcurrentSinArraySumator();
//		System.out.println(sum.arraySum(100000));
		
		List<Double> listToSort = new ArrayList<>();
		for(int count = 0; count <= 5000; count++){
			listToSort.add((Math.random() * 1000));
		}
		long time = System.currentTimeMillis();
		MergeSorter<Double> sorter = new OneThreadMergeSorter<>();
		List<Double> list = sorter.mergeSort(listToSort);
		System.out.println(list);
		System.out.println(System.currentTimeMillis() - time);
	}

}
